Hitchhiking
Chile is well-known as a hitchhikers paradise. Getting to Calama from any other point in the country is simple enough, but reaching San Pedro is a bit trickier. The best chances are to be had at the Topater monolith "Monolito de Topater". From there, walk south, beyond the underpass, and hitch a ride to town. You might have to wait for a while, but traffic to and from Calama is fairly consistent. Sometimes, even the vans of tourist agencies might pick you up-it all depends on your luck.
By car
At the Calama airport you may rent a car. Car rentals are fairly expensive, however, for Calama is Chile's largest mining hub, and therefore rentals offer mostly medium pick-up trucks. You will need an international driving permit if you're not Argentinian or Chilean. Rentals are cheaper in Antofagasta, but the drive to San Pedro is long about four hours. Most popular destinations are fairly easy to reach with a good map, but driving high in the Andes should not be undertaken by beginners in the area! The roads are often in terrible condition, not signaled at all, there's no cell phone signal, and acute mountain sickness is a real threat. Getting stuck in the less-traveled roads of the "altiplano" can be a death sentence, since some aren't used at all, and see perhaps a car every two months.
Always travel with a full tank, since the only gas station in the area is in San Pedro. You can find illegal fuel vendors in some of the smaller towns, like Toconao, but they charge outrageous prices. Also, remember that fuel consumption increases dramatically with rising altitude. Check the condition of all tires, even the spare; flat tires aren't at all unusual on the many dirt roads that lead to points of interest.